package dome1;

public class Cat extends Pet {
    public Cat(String name,String type,int age,String color,int hungerDegree){
        super(name,type,age,color,hungerDegree);
    }

    public Cat() {

    }

    @Override
    public void eat(){
        if(!isDead()){
            setHungerDegree(getHungerDegree()-5);
            System.out.println(this.getName()+"吃东西它的饥饿度减少");
        }else{
            System.out.println(this.getName()+"猫将死亡。");
        }

    }
    public void play(){
        System.out.println("猫在玩球");

    }
}